﻿namespace MeiWinForms.comm;

public static class Output
{
    public delegate void OutputHandler(string text);

    private static event OutputHandler OnWriteOutput =
        Logger.GetLogger("output", Logger.Level.Debug).Info;

    public static void WriteOutput(string text)
    {
        OnWriteOutput.Invoke(text);
    }

    public static void Subscribe(OutputHandler handler)
    {
        OnWriteOutput += handler;
    }
}